%
% This script demonstrates how the optional "root" parameter to
% glade_xml_new() allows you to generate only a subset of the
% interface defined in a Glade XML file.
%

import("gtk");
import("glade");

variable xml = glade_xml_new("texteditor.glade", "AboutDialog");
variable main_window = glade_xml_get_widget(xml, "MainWindow");
variable about_dialog = glade_xml_get_widget(xml, "AboutDialog");

if (main_window == NULL)
  message("MainWindow successfully NOT created");
else
  message("Oops, MainWindow should not have been created!");

() = gtk_dialog_run(about_dialog);

